package com.sport.service.impl;

import com.sport.bean.PageParam;
import com.sport.bean.Teacher;
import com.sport.dao.TeacherDao;
import com.sport.service.TeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class TeacherServiceImpl implements TeacherService {
    @Autowired
    private  TeacherService teacherService;
    @Autowired
    private TeacherDao teacherDao;
    @Override
    public List<Teacher> findAll() {
        return teacherDao.findAll();
    }

    @Override
    public Teacher findByName(String name) {
        return teacherDao.findByName(name);
    }

    @Override
    public int updateTea(Teacher teacher) {
        return teacherDao.updateTea(teacher);
    }

    @Override
    public int addTeacher(Teacher teacher) {
        return teacherDao.addTeacher(teacher);
    }

    @Override
    public int deletTeacher(Integer id) {
        return teacherDao.deletTeacher(id);
    }

    @Override
    public List<Teacher> listPage(PageParam<Teacher> pageParam) {
        return teacherDao.listPage(pageParam);
    }

    @Override
    public Teacher findById(Integer id) {
        return teacherDao.findById(id);
    }
}
